<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="keyword"  content="Tooi">
    <link rel="shortcut icon" href="/img/favicon.ico">

    <title>
        
        微服务架构 &amp; Spring Cloud - Tooi的博客 | Tooi-Blog
        
    </title>

    <!-- Custom CSS -->
    <link rel="stylesheet" href="/css/aircloud.css">
    <link rel="stylesheet" href="/css/gitment.css">
    <!--<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">-->
    <link href="//at.alicdn.com/t/font_620856_pl6z7sid89qkt9.css" rel="stylesheet" type="text/css">
    <!-- ga & ba script hoook -->
    <script></script>
</head>

<body>

<div class="site-nav-toggle" id="site-nav-toggle">
    <button>
        <span class="btn-bar"></span>
        <span class="btn-bar"></span>
        <span class="btn-bar"></span>
    </button>
</div>

<div class="index-about">
    <i> 瞄准月亮。 </i>
</div>

<div class="index-container">
    
    <div class="index-left">
        
<div class="nav" id="nav">
    <div class="avatar-name">
        <div class="avatar ">
            <img src="/img/avatar.jpg" />
        </div>
        <div class="name">
            <i>Tooi6</i>
        </div>
    </div>
    <div class="contents" id="nav-content">
        <ul>
            <li >
                <a href="/">
                    <i class="iconfont icon-shouye1"></i>
                    <span>主页</span>
                </a>
            </li>
            <li >
                <a href="/tags">
                    <i class="iconfont icon-biaoqian1"></i>
                    <span>标签</span>
                </a>
            </li>
            <li >
                <a href="/archives">
                    <i class="iconfont icon-guidang2"></i>
                    <span>存档</span>
                </a>
            </li>
            <li >
                <a href="/about/">
                    <i class="iconfont icon-guanyu2"></i>
                    <span>关于</span>
                </a>
            </li>
            
            <li>
                <a id="search">
                    <i class="iconfont icon-sousuo1"></i>
                    <span>搜索</span>
                </a>
            </li>
            
        </ul>
    </div>
    
        <div id="toc" class="toc-article">
    <ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#概述"><span class="toc-text">概述</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#什么是微服务？"><span class="toc-text">什么是微服务？</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#微服务架构的优势"><span class="toc-text">微服务架构的优势</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#什么是SpringCloud？"><span class="toc-text">什么是SpringCloud？</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Spring-Cloud的核心组件"><span class="toc-text">Spring Cloud的核心组件</span></a></li></ol>
</div>
    
</div>


<div class="search-field" id="search-field">
    <div class="search-container">
        <div class="search-input">
            <span id="esc-search"> <i class="icon-fanhui iconfont"></i></span>
            <input id="search-input"/>
            <span id="begin-search">搜索</span>
        </div>
        <div class="search-result-container" id="search-result-container">

        </div>
    </div>
</div>

        <div class="index-about-mobile">
            <i> 瞄准月亮。 </i>
        </div>
    </div>
    
    <div class="index-middle">
        <!-- Main Content -->
        


<div class="post-container">
    <div class="post-title">
        微服务架构 &amp; Spring Cloud
    </div>

    <div class="post-meta">
        <span class="attr">发布于：<span>2019-11-10 10:54:06</span></span>
        
        <span class="attr">标签：/
        
        <a class="tag" href="/tags/#Spring Cloud" title="Spring Cloud">Spring Cloud</a>
        <span>/</span>
        
        <a class="tag" href="/tags/#微服务架构" title="微服务架构">微服务架构</a>
        <span>/</span>
        
        
        </span>
        <span class="attr">访问：<span id="busuanzi_value_page_pv"></span>
</span>
</span>
    </div>
    <div class="post-content ">
        <h3 id="概述"><a href="#概述" class="headerlink" title="概述"></a>概述</h3><h4 id="什么是微服务？"><a href="#什么是微服务？" class="headerlink" title="什么是微服务？"></a>什么是微服务？</h4><blockquote>
<p>微服务的概念源于2014年3月Martin Fowler所写的一篇文章“Microservices”。<br><strong>微服务架构：</strong> 是一种架构模式，它提倡将单一应用程序划分成一组小的服务，服务之间互相协调、互相配合，为用户提供最终价值。每个服务运行在其独立的进程中，服务与服务间采用<strong>轻量级的通信机制</strong>互相沟通（通常是基于HTTP的RESTful API）。<br><strong>微服务：</strong> 是一种架构风格，一个大型复杂软件应用由一个或多个微服务组成。系统中的各个微服务可被独立部署，各个微服务之间是<strong>松耦合</strong>的。</p>
</blockquote>
<h4 id="微服务架构的优势"><a href="#微服务架构的优势" class="headerlink" title="微服务架构的优势"></a>微服务架构的优势</h4><ul>
<li><strong>复杂度可控：</strong>  <blockquote>
<p>每一个微服务专注于<strong>单一功能</strong>，并通过定义良好的接口清晰表述服务边界。由于体积小、复杂度低，每个微服务可由一个小规模开发团队完全掌控，易于保持高可维护性和开发效率。  </p>
</blockquote>
</li>
<li><strong>独立部署：</strong>  <blockquote>
<p>由于微服务具备<strong>独立的运行进程</strong>，所以每个微服务也可以独立部署。  </p>
</blockquote>
</li>
<li><strong>技术选型灵活：</strong>  <blockquote>
<p>微服务架构下，技术选型是去中心化的。每个团队可以根据自身服务的需求和行业发展的现状，自由选择最适合的技术栈。</p>
</blockquote>
</li>
<li><strong>容错：</strong>  <blockquote>
<p>在微服务架构下，故障会被隔离在单个服务中。若设计良好，其他服务可通过<strong>重试、平稳退化</strong>等机制实现应用层面的容错。</p>
</blockquote>
</li>
<li><strong>扩展</strong>  <blockquote>
<p>微服务架构在扩展功能方面具有灵活性，因为每个服务可以<strong>根据实际需求独立进行扩展</strong></p>
</blockquote>
</li>
</ul>
<h4 id="什么是SpringCloud？"><a href="#什么是SpringCloud？" class="headerlink" title="什么是SpringCloud？"></a>什么是SpringCloud？</h4><blockquote>
<p>SpringCloud是<strong>微服务架构的集大成者</strong>，将一系列优秀的组件进行了整合。SpringCloud的组件相当繁杂，拥有诸多子项目。重点关注<strong>Netflix</strong></p>
</blockquote>
<h3 id="Spring-Cloud的核心组件"><a href="#Spring-Cloud的核心组件" class="headerlink" title="Spring Cloud的核心组件"></a>Spring Cloud的核心组件</h3><p><img src="https://note.youdao.com/yws/api/personal/file/D47A17F9F0054D368770574184DB81FB?method=download&shareKey=56a5caadbcea630f69ae65cc14c960cd" alt="image">  </p>

        
            <div class="donate-container">
    <div class="donate-button">
        <button id="donate-button">赞赏</button>
    </div>
    <div class="donate-img-container hide" id="donate-img-container">
        <img id="donate-img" src="" data-src="/img/donate.png">
        <p> 感谢鼓励 </p>
    </div>
</div>
        
        <br />
        <div id="comment-container">
        </div>
        <div id="disqus_thread"></div>

        <div id="lv-container">
        </div>

    </div>
</div>

    </div>
</div>


<footer class="footer">
    <ul class="list-inline text-center">
        
        

        

        

        
        <li>
            <a target="_blank"  href="https://github.com/Tooi6">
                            <span class="fa-stack fa-lg">
                                <i class="iconfont icon-github"></i>
                            </span>
            </a>
        </li>
        

        

    </ul>
    
    <p>
        <span>/</span>
        
        <span><a href="https://github.com/Tooi6" target="_blank" rel="noopener">Tooi6</a></span>
        <span>/</span>
        
        <span><a href="#">Tooi-Blog</a></span>
        <span>/</span>
        
        <span><a href="#">It helps SEO</a></span>
        <span>/</span>
        
    </p>
    
    <p>
        <span id="busuanzi_container_site_pv">
            <span id="busuanzi_value_site_pv"></span>PV
        </span>
        <span id="busuanzi_container_site_uv">
            <span id="busuanzi_value_site_uv"></span>UV
        </span>
        Created By <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>  Theme <a href="https://github.com/aircloud/hexo-theme-aircloud" target="_blank" rel="noopener">AirCloud</a></p>
</footer>




</body>

<script>
    // We expose some of the variables needed by the front end
    window.hexo_search_path = "search.json"
    window.hexo_root = "/"
    window.isPost = true
</script>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script src="/js/index.js"></script>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>




</html>
